* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    color: #fff;
}

.game-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.stats > div {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 1.1rem;
}

.gold {
    color: #ffd700;
    font-weight: bold;
}

main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 600px) {
    main { grid-template-columns: 1fr; }
}

.click-area {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    min-height: 300px;
}

.coin-btn {
    font-size: 8rem;
    background: radial-gradient(circle, #ffd700 0%, #b8860b 100%);
    border: none;
    border-radius: 50%;
    width: 200px;
    height: 200px;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.4);
}

.coin-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.6);
}

.coin-btn:active {
    transform: scale(0.95);
}


#click-effects {
    position: absolute;
    pointer-events: none;
    width: 100%;
    height: 100%;
}

.click-text {
    position: absolute;
    color: #ffd700;
    font-weight: bold;
    font-size: 1.5rem;
    animation: float-up 1s ease-out forwards;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

@keyframes float-up {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-80px); }
}

.upgrades {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
}

.upgrades h2 {
    margin-bottom: 15px;
    text-align: center;
}

.upgrade-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
}

.upgrade-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.upgrade-item:hover {
    background: rgba(255, 255, 255, 0.15);
}

.upgrade-info h3 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.upgrade-info p {
    font-size: 0.85rem;
    color: #aaa;
}

.upgrade-info .owned {
    color: #4ade80;
    font-size: 0.8rem;
}

.buy-btn {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.2s;
}

.buy-btn:hover:not(:disabled) {
    transform: scale(1.05);
}

.buy-btn:disabled {
    background: #555;
    cursor: not-allowed;
    opacity: 0.6;
}

footer {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

footer button {
    padding: 10px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.1s;
}

footer button:hover {
    transform: scale(1.05);
}

#save-btn {
    background: #3b82f6;
    color: #fff;
}

#reset-btn {
    background: #ef4444;
    color: #fff;
}
